
//适配移动端
	function resize() {
		var deviceWidth = document.documentElement.clientWidth;
		if (deviceWidth < 240) deviceWidth = 240;
			document.documentElement.style.cssText = 'font-size:' + (deviceWidth / 15) + 'px!important';
	}
	window.addEventListener('resize', resize);
resize();

//页面DOM结构绘制完成后执行
$(document).ready(function(){
//	$('#screen').fadeIn(0);
	//使得用户无法滚动
//	document.documentElement.style.overflow = 'hidden';
});

$(".headerSec div").hover(function() {
	$(".headerSec div").css({
		backgroundColor: "#FFFFFF",
		color: "#357ffa",
		border: "1px solid #FFFFFF",
		boxShadow:"0 10px 25px rgba(0,52,74,0.18)"
	});

	$(".headerSec section").css({
		backgroundColor: "rgba(0,0,0,0)",
		color: "#FFFFFF",
		border: "1px solid #FFFFFF",
		boxShadow:"0 10px 25px rgba(0,0,0,0)"
	});
	$('.iosImg').attr('src','__CDN__/assets/img/helper/icon_banner_ios_hl.png');
	$('.andImg').attr('src','__CDN__/assets/img/helper/icon_banner_Android_nor.png');
}, function() {
	$(".headerSec div").css({
		backgroundColor: "rgba(0,0,0,0)",
		color: "#FFFFFF",
		border: "1px solid #FFFFFF",
		boxShadow:"0 10px 25px rgba(0,0,0,0)"
	});
	$('.iosImg').attr('src','__CDN__/assets/img/helper/icon_banner_ios_nor.png');
	$('.andImg').attr('src','__CDN__/assets/img/helper/icon_banner_Android_nor.png');
});

$(".headerSec section").hover(function() {
	$(".headerSec section").css({
		backgroundColor: "#FFFFFF",
		color: "#357ffa",
		border: "1px solid #FFFFFF",
		boxShadow:"0 10px 25px rgba(0,52,74,0.18)"
	});

	$(".headerSec div").css({
		backgroundColor: "rgba(0,0,0,0)",
		color: "#FFFFFF",
		border: "1px solid #FFFFFF",
		boxShadow:"0 10px 25px rgba(0,0,0,0)"
	});
	$('.andImg').attr('src','__CDN__/assets/img/helper/icon_banner_Android_hl.png');
	$('.iosImg').attr('src','__CDN__/assets/img/helper/icon_banner_ios_nor.png');
}, function() {
	$(".headerSec section").css({
		backgroundColor: "rgba(0,0,0,0)",
		color: "#FFFFFF",
		border: "1px solid #FFFFFF",
		boxShadow:"0 10px 25px rgba(0,0,0,0)"
	});
	$('.iosImg').attr('src','__CDN__/assets/img/helper/icon_banner_ios_nor.png');
	$('.andImg').attr('src','__CDN__/assets/img/helper/icon_banner_Android_nor.png');
});
window.addEventListener('scroll',function(){
		var windowWidth = window.innerWidth; 
		var ScrTop = document.documentElement.scrollTop;
		if(windowWidth > 750){
			if(ScrTop > 0){
				$('.navbar').css({
					backgroundColor: "#FFFFFF",
					boxShadow:"0 10px 25px rgba(0,52,74,0.18)"
				});
				$(".navbar a").css("cssText", "color:#333333 !important;");
				$(".navbar span").css("cssText", "color:#333333 !important;");
				$('.logo1').attr('src','__CDN__/assets/img/helper/logo_1.png');
				$('.selectLan').attr('src','__CDN__/assets/img/helper/arrow_2.png');
				$('.downLoad').css({
					color: "#ffffff"
				});
				$('.downLoad>a').css("cssText", "color:#ffffff !important;");
				$('.downLoad').addClass('downloadBc');
				$('.navbar-nav a').hover(function(){
					$(this).css("cssText", "color:#357FFA !important;");
				},function(){
					$(this).css("cssText", "color:#333333 !important;")
				})
			}else{
				$('.navbar').css({
					backgroundColor: "rgba(0,0,0,0)",
					boxShadow:"0 0 0 rgba(0,0,0,0)"
				});
				$(".navbar a").css("cssText", "color:#ffffff !important;");
				$(".navbar span").css("cssText", "color:#ffffff !important;");
				$('.logo1').attr('src','__CDN__/assets/img/helper/logo_2.png');
				$('.selectLan').attr('src','__CDN__/assets/img/helper/arrow_1.png');
				$('.downLoad').css({
					backgroundColor: "#FFFFFF",
					color: "#357ffa"
				});
				$('.downLoad>a').css("cssText", "color:#357ffa !important;");
				$('.downLoad').removeClass('downloadBc');
				$('.navbar-nav a').hover(function(){
					$(this).css("cssText", "color:#357FFA !important;");
				},function(){
					$(this).css("cssText", "color:#ffffff !important;")
				})
			}
		}
		
});

var isBegin = false;
$('.navbar-header button').click(function(){
	if(isBegin == false){
		$('.navbar-header button').css({
			width:"0.76rem",
			height:"0.76rem",
			top:"0.74rem",
			backgroundImage:'url(__CDN__/assets/img/helper/mobile/xz4.png)',
			backgroundSize:"90%90%",
			backgroundPosition:"center",
			backgroundColor: '#ffffff'
		});
		$('#navbar').slideDown(250)
	}else{
		$('.navbar-header button').css({
			width:"0.76rem",
			height:"0.6rem",
			top:"0.83rem",
			backgroundImage:'url(__CDN__/assets/img/helper/mobile/icon_nav.png)',
			backgroundSize:"90%90%",
			backgroundPosition:"center",
			backgroundColor: '#ffffff'
		});
		$('#navbar').slideUp(250)
	}
	isBegin = !isBegin
});

$('.cutLan').click(function(){
	//取消事件冒泡 
    event.stopPropagation(); 
	$('.lan').slideToggle(500);
});
//点击空白处隐藏弹出层，下面为滑动消失效果和淡出消失效果。
    $(document).click(function(event){
        var _con = $('.lan');  // 设置目标区域
        if(!_con.is(event.target) && _con.has(event.target).length === 0){ // Mark 1
           //$('#divTop').slideUp('slow');  //滑动消失
           $('.lan').slideUp(500);   //淡出消失
        }
   });


// 点击空白处弹出框要隐藏掉
$('#screen').click(function() {
	$('#screen').fadeOut(200);
	//使得用户可以滚动
	document.documentElement.style.overflow = 'auto';
});

$('.screen_close').hover(function(){
	$('.screen_close').attr('src','__CDN__/assets/img/helper/close_hover.png');
},function(){
	$('.screen_close').attr('src','__CDN__/assets/img/helper/close_default.png');
});

// 点击关闭按钮弹出框要隐藏掉
$('.screen_close').click(function() {
	$('#screen').fadeOut(200);
	//使得用户可以滚动
	document.documentElement.style.overflow = 'auto';
});

//"参加活动"按钮鼠标停留样式
$('.screen_cj').hover(function() {
	$('.screen_btn').attr('src', '__CDN__/assets/img/helper/pop_btn_1.png')
}, function() {
	$('.screen_btn').attr('src', '__CDN__/assets/img/helper/pop_btn.png')
});

var isBegin5 = false;
$('.navbar-nav').each(function(index,elem){
	$(this).click(function(e){
		$('#navbar').slideUp(250);
		if(isBegin5 == false){
			$('.navbar-header button').css({
				width:"0.76rem",
				height:"0.58rem",
				top:"0.83rem",
				backgroundImage:'url(__CDN__/assets/img/helper/mobile/icon_nav.png)',
				backgroundColor: '#ffffff'
			})
		}else{
			$('.navbar-header button').css({
				width:"0.76rem",
				height:"0.76rem",
				top:"0.74rem",
				backgroundImage:'url(__CDN__/assets/img/helper/mobile/xz4.png)',
				backgroundColor: '#ffffff'
			})
		}
	})
})